{% extends "module/common.html" %}
	{% block handle %}
    	var handle={
    		name:'服务',
    		serv:'service'
    	};
    	  	          
    {% endblock %}
    {% block listhead %}
                   
		var listHeadCfg={
			name:{name:'名称',css:{width:'15%'}},
			path:{name:'访问路径',css:{width:'15%'}},
			package:{name:'包',css:{width:'15%'}},
            proName:{name:'所属项目',css:{width:'15%'},bindFunc:true},
            remark:{name:'备注',css:{width:'15%'}},        
			ctrl:{name:'操作',css:{width:'25%'},bindFunc:true}
		}
    	
		var renderTemplate=$("<div class='table_template'>"+
								"<div class='tr'>"+
										"<div class='td' jtext='name'></div>"+
										"<div class='td' jtext='path'></div>"+
										"<div class='td' jtext='package'></div>"+
                                        "<div class='td' jtext='proName'></div>"+
										"<div class='td' jtext='remark'></div>"+																														
										"<div class='td' jtext='ctrl'></div>"+			
								"</div>"+
							"</div>");
        
    {% endblock %}
    {% block listfunc %}
		tableHandle.addFunc("ctrl",function(){
			return $(
        			"<button class='btn' callFunc='click:editTemplate'>编辑</button>"+           		                            
					"<button class='btn' callFunc='click:delTemplate'>删除</button>");
		},body);	
                    
        tableHandle.addFunc("proName",function(){
           return $("<a href='javascript:void(0)' callFunc='click:showPro' >"+this.proName+"</a>");
		},body);
        
      					
	{% endblock %}	
	{% block other %}
       
       yanhx.addFunc("showPro",function(){
           //项目绑定表单及页面同步
           var rowData=body.$tableRow();
           var cond={
           		page:1,
           		pageSize:15,
           		proId:rowData.proId
           };
           queryTemplate(cond); 
        });	
        
    {% endblock %}    		